const baseUrl = 'http://zdh.goodsceo.com'
const request = {
  baseUrl,
  configapi: (configData) => {
    const _data = configData.data || ''
    return new Promise((resolve, reject) => {
      uni.request({
        method: configData.type,
        url: baseUrl + configData.url,
        data: _data,
        success: (res) => {
          if (res.statusCode === 200) {
            resolve(res.data)
          }
        },
        fail: (err) => {
          console.log('错误信息:' + err)
        }
      })
    })
  }
}
export default request